package com.exam.scjp5.objectives.section_1;

enum Fruit
{
    Banana("Fruit-Banana"),
    Apple("Fruit-Apple");
    
    private String name = "";
    
    Fruit(String name) // Enum's constructor is PRIVATE
    {
        this.name = name;
    }
    
    public String toString()
    {
        return this.name;
    }
}

public class ExampleEnum
{

    public static void main(String[] args)
    {
        Fruit f = Fruit.Banana;
        System.out.println(f);
    }

}
